local jinqu = fk.CreateSkill {
    name = "gai__jinqu",
  }
  
  Fk:loadTranslationTable{
    ["gai__jinqu"] = "进趋",
    [":gai__jinqu"] = "你可以跳过弃牌阶段并摸两张牌，然后将手牌弃至X张（X为你本回合发动〖奇制〗的次数+1）。",
  
    ["#jinqu-invoke"] = "进趋：是否跳过弃牌阶段并摸两张牌，然后将手牌弃至%arg？",
  
    ["$gai__jinqu1"] = "建上昶水城，以逼夏口！",
    ["$gai__jinqu2"] = "通川聚粮，伐吴之业，当步步为营。",
  }
  
  jinqu:addEffect(fk.EventPhaseChanging, {
    anim_type = "drawcard",
    can_trigger = function(self, event, target, player, data)
      return target == player and player:hasSkill(jinqu.name) and 
             data.phase == Player.Discard and not data.skipped
    end,
    on_cost = function (self, event, target, player, data)
      return player.room:askToSkillInvoke(player, {
        skill_name = jinqu.name,
        prompt = "#jinqu-invoke:::"..(player:usedSkillTimes("gai__qizhi", Player.HistoryTurn) + 1)
      })
    end,
    on_use = function(self, event, target, player, data)
      data.skipped = true
      player:drawCards(2, jinqu.name)
      if player.dead then return end
      local n = player:getHandcardNum() - (player:usedSkillTimes("gai__qizhi", Player.HistoryTurn) + 1)
      if n > 0 then
        player.room:askToDiscard(player, {
          min_num = n,
          max_num = n,
          include_equip = false,
          skill_name = jinqu.name,
          cancelable = false,
        })
      end
    end,
  })
  
  return jinqu